package PreProcessData;

import java.io.IOException;
import java.util.Map;

public class UnitTest {

	public static void main(String[] args) throws IOException {
		/**
		 * Unit test for TrectextCollection.nextDocument method
		 */
		DocumentCollection textCorpus = new TrectextCollection(); // Load whole collection
		Map<String, Object> textDoc = null; // Store single doc in the collection
		while((textDoc = textCorpus.nextDocument()) != null) {
			
		}
		
		/**
		 * Unit test for TrecwebCollection.nextDocument method
		 */
//		DocumentCollection webCorpus = new TrecwebCollection();
//		Map<String, Object> webDoc = null;
//		while((webDoc = webCorpus.nextDocument()) != null) {
//			
//		}
	
		/**
		 * Test for regular expression used in WordTokenizer
		 */
//		String nonDigitOrLetter = "([[^0-9]&&[^a-z]&&[^A-Z]]+)";
//		//String nonSymbols = "(\\\\')|(\\\\.)|(\\t)";
//	    String src = "With the current strain on the system, though, Garcia said \"that relief isn't coming in necessarily in 24 hours. So we're having to find ways to maximize rest periods throughout the day.\"";
//	    String dest = src.replaceAll(nonDigitOrLetter, " ")
//	    		         //.replaceAll(nonSymbols, "")
//	                     .replaceAll("( )+", " ");
//	    System.out.println(dest);
	    
	}
}